<?php

declare(strict_types=1);

namespace App\Request\My;

use App\Request\BaseCommonRequest;
use Hyperf\Context\Context;
use Hyperf\Validation\Request\FormRequest;

class CallIncomeRequest extends BaseCommonRequest
{
    /**
     * Determine if the user is authorized to make this request.
     */
    // public function authorize(): bool
    // {
    //     return true;
    // }


    /**
     * Get the validation rules that apply to the request.
     */
    public function rules(): array
    {
        return [
            'call_type' => 'required|in:1,2'
        ];
    }


    // public function messages(): array
    // {
    //     $language = Context::get('language');
    //     if ($language == 'zh-zn') {
    //         return [
    //             'call_type.required' => '通话类型必填',
    //             'call_type.in' => '通话类型只能是1,2',
    //         ];
    //     } elseif ($language == 'zh-hk') {
    //         return [
    //             'call_type.required' => '通話類型必填',
    //             'call_type.in' => '通話類型只能是1,2',
    //         ];
    //     } else {
    //         return [
    //             'call_type.required' => 'Call type is required',
    //             'call_type.in' => 'Call type only can be 1,2',
    //         ];
    //     }
    // }
}
